package com.css.zfzx.fwsjcj.modules.expert.respository;

import com.css.bpm.platform.org.division.repository.entity.DivisionEntity;
import com.css.zfzx.fwsjcj.modules.expert.entity.FwExpertEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Repository
public interface FwExpertRespository extends JpaRepository<FwExpertEntity,String> {

    @Transactional
    @Modifying
    @Query(
            value = "update fw_expert_direction " +
                    "set structure_type=:#{#fwExpertEntity.getStructureType()},data_type=:#{#fwExpertEntity.getDataType()},update_user=:#{#fwExpertEntity.getUpdateUser()},update_time=:#{#fwExpertEntity.getUpdateTime()}  " +
                    "where user_id=:#{#fwExpertEntity.getUserId()}",nativeQuery = true
    )
    void edit(@Param("fwExpertEntity") FwExpertEntity fwExpertEntity);






}
